#!usr/bin/perl -w

#定义了ValueQuery类
package ValueQuery;

require Exporter;
require Query;
@ISA=qw(Exporter Query);
@EXPORT=qw();
use strict;

sub new()
{
	my $class=shift;
	my $self=Query->new(@_);
	bless $self,$class;
	$self->Construct();
	return $self;
}

sub Construct()
{
	my $this=shift;
	$this->{'iValueRange'}=();
}

sub ValueRange()
{
	my $self=shift;
	my @range=@_;
	if (@range > 1)
	{
		$self->{'iValueRange'}=@range;
	}
	return $self->{'iValueRange'};
}

sub Parse()
{
	my $this=shift;
	$this->SUPER::Parse(@_);

	my ($ref)=@_;
	my $min=undef;
	my $max=undef;
	if (defined $ref->{'min'})
	{
		$min=$ref->{'min'};
	}
	if (defined $ref->{'max'})
	{
		$max=$ref->{'max'};
	}
	if (defined $min && defined $max)
	{
		$this->ValueRange($min,$max);
	}
}

1;

